<?php

class VoprosotvetController extends Controller
{
	public function actionIndex()
	{
		$criteria=new CDbCriteria();
		$criteria->condition='status=:status';
		$criteria->params=array(':status'=>  VoprosOtvet::STATUS_PUBLIC);

		$voprosotvet=VoprosOtvet::model()->findAll($criteria);

		if($voprosotvet===null){
			throw new CHttpException(404,'The requested page does not exist.');
		}

		$this->render('index',array('voprosotvet'=>$voprosotvet));
	}

	
}